# Installed with puppet it will over
# the cvmfs_config created one.

# Enable api functions
WSGIPythonPath /usr/share/cvmfs-server/webapi
Alias /cvmfs/<%= @repo %>/api /var/www/wsgi-scripts/cvmfs-api.wsgi/<%= @repo %>
Alias /opt/<%= @repo.split('.').first %>/api /var/www/wsgi-scripts/cvmfs-api.wsgi/<%= @repo %>

<Directory /var/www/wsgi-scripts>
    Options ExecCGI
    SetHandler wsgi-script
    Order allow,deny
    Allow from all
</Directory>

KeepAlive On
AddType application/json .json
# Translation URL to real pathname
Alias /cvmfs/<%= @repo %> /srv/cvmfs/<%= @repo %>
Alias /opt/<%= @repo.split('.').first %> /srv/cvmfs/<%= @repo %>
<Directory "/srv/cvmfs/<%= @repo %>">
    Options -MultiViews
    AllowOverride Limit
    Order allow,deny
    Allow from all

    EnableMMAP Off
    EnableSendFile Off

    <FilesMatch "^\.cvmfs">
        ForceType application/x-cvmfs
    </FilesMatch>

    Header unset Last-Modified
    FileETag None

    ExpiresActive On
    ExpiresDefault "access plus 3 days"
    ExpiresByType application/x-cvmfs "access plus 2 minutes"
    ExpiresByType application/json    "access plus 2 minutes"
</Directory>
